package org.example.DesignPatterns.Command;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-24 10:53
 **/
public class SwitchCommand implements Command {

    private Bulb bulb;

    public SwitchCommand(Bulb bulb) {
        this.bulb = bulb;
    }

    @Override
    public void exe() {
        bulb.on();
    }

    @Override
    public void unexe() {
        bulb.off();
    }
}